02. 使用 SQL 访问数据

提取数据

在下面编写一个 SQL 查询

使用下面的 SQL Workspace 从气温数据库中提取数据,然后将结果下载为 CSV 文件。在电子表格程序中打开,对其进行分析。

数据库模式

数据库中有三个表:

  • city_list - 这个表包含数据库中的城市和国家列表。看看这个列表,找到离你所在城市最近的城市。
  • city_data - 这个表包含每个城市每年的平均气温 (ºC)。
  • global_data - 这个表包含每年的全球平均气温 (ºC)。

提示:如果在 workspace 中无法看到正确的数据,请在workspace的左下角选择“Menu” -> "Reset data"。

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: sql-evaluator
  • Opened files (when workspace is loaded): n/a